<!DOCTYPE html>
<html lang="zh">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>多媒体对象</title>

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    <!--<link rel="stylesheet" href="../../../libs/bootstrap4/css/bootstrap.css">-->

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
    <style>
        body>div{
            margin-bottom: 50px;
        }
    </style>
</head>
<body>
<div class="container mt-3">
    <h2>多媒体对象</h2>
    <p>使用 .media 和 .media-body 类创建多媒体对象:</p>
    <div class="media border p-3">
        <img src="http://static.runoob.com/images/mobile-icon.png" alt="John Doe" class="mr-3 mt-3 rounded-circle" style="width:60px;">
        <div class="media-body">
            <h4>菜鸟教程</h4>
            <p>学的不仅是技术，更是梦想！！！</p>
        </div>
    </div>
</div>
<div class="container mt-3">
    <h2>多媒体对象嵌套</h2>
    <p>多媒体对象可以多个嵌套（一个多媒体对象中包含另外一个多媒体对象）:</p><br>
    <div class="media border p-3">
        <img src="http://static.runoob.com/images/mobile-icon.png" alt="John Doe" class="mr-3 mt-3 rounded-circle" style="width:60px;">
        <div class="media-body">
            <h4>菜鸟教程</h4>
            <p>学的不仅是技术，更是梦想！！！</p>
            <div class="media p-3">
                <img src="http://static.runoob.com/images/mobile-icon.png" alt="Jane Doe" class="mr-3 mt-3 rounded-circle" style="width:45px;">
                <div class="media-body">
                    <h4>菜鸟教程</h4>
                    <p>学的不仅是技术，更是梦想！！！</p>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="container mt-3">
    <h2>图片显示在右边</h2>
    <p>如果你想将头像图片显示在右侧，可以在 .media-body 容器后添加图片:</p>
    <div class="media border p-3">
        <div class="media-body">
            <h4>菜鸟教程</h4>
            <p>学的不仅是技术，更是梦想！！！</p>
        </div>
        <img src="http://static.runoob.com/images/mobile-icon.png" alt="John Doe" class="ml-3 mt-3 rounded-circle" style="width:60px;">
    </div>
</div>

<div class="container mt-3">
    <h2>多媒体对象</h2>
    <p>我们可以使用 align-self-* 相关类来设置多媒体对象的图片显示位置：</p><br>
    <!-- 头部 -->
    <div class="media">
        <img src="http://static.runoob.com/images/mobile-icon.png" class="align-self-start mr-3" style="width:60px">
        <div class="media-body">
            <h4>头部 -- 菜鸟教程</h4>
            <p>学的不仅是技术，更是梦想！！
            <p>学的不仅是技术，更是梦想！！
            <p>学的不仅是技术，更是梦想！！
        </div>
    </div>

    <!-- 居中 -->
    <div class="media mt-3">
        <img src="http://static.runoob.com/images/mobile-icon.png" class="align-self-center mr-3" style="width:60px">
        <div class="media-body">
            <h4>居中 -- 菜鸟教程</h4>
            <p>学的不仅是技术，更是梦想！！
            <p>学的不仅是技术，更是梦想！！
            <p>学的不仅是技术，更是梦想！！
        </div>
    </div>

    <!-- 底部 -->
    <div class="media mt-3">
        <img src="http://static.runoob.com/images/mobile-icon.png" class="align-self-end mr-3" style="width:60px">
        <div class="media-body">
            <h4>底部 -- 菜鸟教程</h4>
            <p>学的不仅是技术，更是梦想！！
            <p>学的不仅是技术，更是梦想！！
            <p>学的不仅是技术，更是梦想！！
        </div>
    </div>
</div>
</body>
</html>